<template>
    <h2>用户登录</h2>
    <table class="table table-bordered">
        <tr>
            <td>用户名</td>
            <td>密码</td>
            <td>登录日期</td>
        </tr>
        <tr v-for="item in list">
            <td>{{ item.U_Name }}</td>
            <td>{{ item.U_Pwd }}</td>
            <td>{{ item.U_Date.substr(0,10) }}</td>
        </tr>
    </table>
</template>

<script setup lang="ts">
import {ref, reactive, onMounted,toRefs} from 'vue'
import {useRouter,useRoute} from 'vue-router'
import axios from 'axios';
const router=useRouter();
const route=useRoute();
const data:any=reactive({
    state:{
      
    },
    list:[]
})
let {state,list} =toRefs(data);
onMounted(()=>{
  show();
})

//用户登录
const show=()=>{
    axios({
        url:"/api/UserLogin/SelUsers",
        method:'get',

    })
    .then(res=>{
        console.log(res);
        list.value=res.data.data;
    })
}
</script>


<style>


</style>